﻿namespace SubhadraSolutions.Sharp.Utils.TestApplication
{
    using System.ComponentModel;

    using SubhadraSolutions.Sharp.Utils.ComponentModel;

    public class DummyEmployee : INotifyPropertyChanged, INotifyPropertyChanging
    {
        public event PropertyChangingEventHandler PropertyChanging;

        public event PropertyChangedEventHandler PropertyChanged;

        public string FirstName { get; set; }

        public int Id { get; set; }

        public string LastName { get; set; }
    }

    public static class NotifyPropertyChangedLauncher
    {
        private static void Test()
        {
            var emp = new DummyEmployee();
            emp.PropertyChanging += emp_PropertyChanging;
            emp.PropertyChanged += emp_PropertyChanged;
            emp.FirstName = "Subrah";
        }

        private static void emp_PropertyChanging(object sender, PropertyChangingEventArgs e)
        {

        }

        private static void emp_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {

        }

        public static void Launch()
        {
            //NotifyPropertyChangingInjector<DummyEmployee>.Instance.Inject();
            DynamicNotifyPropertyChangeInjectionHelper<DummyEmployee>.Inject();
            Test();
        }
    }
}
